import request from '@/router/axios'
import store from '@/store'
export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  selection: true,
  reserveSelection:true,
  stripe: true,
  menuAlign: 'center',
  viewBtn: true,
  editBtn: false,
  delBtn: false,
  align: 'center',
  addBtn: false,
  column: [{
    fixed: true,
    label: '主键',
    prop: 'id',
    // style:{"display":"none"},
    span: 24,
    type: 'input',
    hide: true
  }, {
    hide: true,
    label: '线路',
    prop: 'lineCode',
    type: 'select',
    search: true,
    filterable : true,
    cascaderItem: ["stationCode"],
    props: {
      label: 'name',
      value: 'code'
    },
    dicUrl: "/check/check/getLineLists?userCode="+ store.getters.userInfo.userCode,
    display: true // 动态显隐控制不能删除
  }, {
    hide: true,
    label: '车站',
    prop: 'stationCode',
    type: 'select',
    search: true,
    filterable : true,
    dicFlag: false,
    props: {
      label: 'name',
      value: 'code'
    },
    dicUrl: "/check/check/getStationLists?userCode="+ store.getters.userInfo.userCode + "&lineCode={{key}}",
    display: true ,// 动态显隐控制不能删除
  }, {
    label: 'TVM编号',
    prop: 'tvmCode',
    type: 'input',
    hide: false,
    search: false
  }, {
    label: '钱箱编号',
    prop: 'moneyBoxCode',
    search: false,
    hide: false,
  }, {
    hide: false,
    label: '钱箱类型',
    prop: 'moneyBoxType',
    formatter :function(row, value , label, column){
      return row.moneyBoxTypeName;
    },
    type:'select',
    dicData: [{
      label: '硬币回收箱',
      value: 1
    },{
      label: '硬币补充箱',
      value: 2
    },{
      label: '纸币回收箱',
      value: 3
    },{
      label: '纸币找零箱',
      value: 4
    },{
      label: '废钞箱',
      value: 5
    }],
    search: true,
  }, {
    hide: true,
    label: '未卸载日期',
    width: 90,
    prop: 'uninstalledDate',
    type: 'datetime',
    format: 'yyyy-MM-dd HH:mm',
    valueFormat: 'yyyy-MM-dd',
    search: true
  },{
    hide: true,
    width: 90,
    label: '卸载日期',
    prop: 'uninstallDate',
    type: 'datetime',
    format: 'yyyy-MM-dd HH:mm',
    valueFormat: 'yyyy-MM-dd',
    search:true
  }, {
    hide: false,
    label: '卸载金额',
    prop: 'uninstallAmount',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    },
    search: false
  }, {
    hide: false,
    label: '卸载人',
    prop: 'inventoryPerson',
    search: false
  }, {
    hide: false,
    label: '卸载人工号',
    prop: 'inventoryPersonJobNo',
    search: false
  }, {
    hide: false,
    width: 90,
    label: '入账日期',
    prop: 'postDate',
    type: 'datetime',
    format: 'yyyy-MM-dd HH:mm',
    valueFormat: 'yyyy-MM-dd',
    search: false,
    editDisplay: false,
    addDisplay: false
  }, {
    hide: true,
    width: 130,
    label: '备注',
    prop: 'remark',
    editDisplay: false,
    search: false,
    addDisplay: false
  }]
}
export function getCashboxUninstallList(param) {
  return request({
    url: '/check/check/getCashboxUninstallList',
    method: 'post',
    params: {
      param:param
    }
  })
}
